package cn.kgc.base.entity;

import java.util.Date;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.*;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * (SysDict)表实体类
 *
 * @author makejava
 * @since 2022-12-01 09:36:44
 */
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName(value = "sys_dict")
@SuppressWarnings("serial")
@JsonInclude(value = JsonInclude.Include.NON_NULL)
public class SysDict extends Model<SysDict> implements Serializable {

    @TableId(type = IdType.AUTO)
    private Long id; //主键


    /**
     * 字典名称
     **/
    @TableField(value = "dict_name")
    private String dictName;


    /**
     * 字典编码
     **/
    @TableField(value = "dict_code")
    private String dictCode;


    /**
     * 描述
     **/
    @TableField(value = "description")
    private String description;


    /**
     * 创建人
     **/
    @TableField(value = "create_by")
    private String createBy;


    /**
     * 更新人
     **/
    @TableField(value = "update_by")
    private String updateBy;


    /**
     * 字典类型0为string,1为number
     **/
    @TableField(value = "type")
    private String type;


    @TableField(value = "creationdate", fill = FieldFill.INSERT)
    @JsonIgnore
    private Date creationdate; //创建时间


    @TableField(value = "modifydate", fill = FieldFill.UPDATE)
    @JsonIgnore
    private Date modifydate; //修改时间


    @TableLogic
    @JsonIgnore
    @TableField(fill = FieldFill.INSERT)
    private int deleted;  //逻辑删除标志


    @Version
    private int version;   //版本


}
